/** \file
 \brief Vectors of coordinates.
 */

#ifndef FASTMD_VECTORS_INCLUDED
#define FASTMD_VECTORS_INCLUDED 1

#include "core/types.hpp"


namespace FastMD 
{
	
	//! vector of V3D
	class Vector 
	{
	private:
		size_t        numvtx_;  //!< for internal memory
	public:
		V3D          *vertex;   //!< vertex[0:vertices-1]
		const size_t  vertices; //!< once allocated vertices
		
		inline V3D       & operator[]( size_t index ) throw()       { assert( index < vertices ); return vertex[index]; }
		inline const V3D & operator[]( size_t index ) const throw() { assert( index < vertices ); return vertex[index]; }
		
		void ldz() throw(); //!< all xyz coordinates to 0
		Vector( size_t n );		
		~Vector() throw();
		
		//! save in XYZ format
		void save_xyz( const string &filename, const string &particleID, const string &comment, bool append ) const;
		
	private:
		YOCTO_DISABLE_COPY_AND_ASSIGN(Vector);
	};
}
#endif

